<?php
error_reporting(E_ALL);
ini_set('display_errors', '1');
header('Content-type: application/json');

include '../db/Mysql.php';
$mysql = new Mysql();
//print_r("<pre>");print_r($_POST);print_r("</pre>");
$tablename = $_POST["tablename"];
$fields = $_POST["fields"];
$table_id_name = $_POST['table_id'];
$fks = $_POST['fks'];
$id = $_POST['id'];
$rows = $mysql->getRows($tablename,$fields,$table_id_name,$fks,$id);
//print_r("<pre>");print_r(array_keys($rows[0]));print_r("</pre>");
//print_r("<pre>");print_r($rows);print_r("</pre>");
echo json_encode($rows);


?>